package com.lanou3g.sockerPractice;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created by dllo on 18/4/21.
 */
public class Servert {
    public static void main(String[] args) {


        try {
            ServerSocket ss = new ServerSocket(2333);
            System.out.println("准备链接");
            while (true){
                Socket client = ss.accept();
                System.out.println("有一个客户端接入:" +client.getRemoteSocketAddress());
                new ServerEchoThread(client).start();

            }
        } catch (Exception e) {
            e.printStackTrace();
        }


    }

}
